if ((module == NULL) || (*module == '\0'))
fatal(MYNAME ": 'avltree_init' should be called with a valid module name!\n");
- tree = xcalloc(1, sizeof(*tree));
+ tree = (avltree_t*) xcalloc(1, sizeof(*tree));
tree->options = options;
tree->module = module;
avlnode_t *node = (*root);
if (node == NULL) {
- (*root) = node = xcalloc(1, sizeof(*node));
+ (*root) = node = (avlnode_t*) xcalloc(1, sizeof(*node));
if (tree->options & AVLTREE_STATIC_KEYS)
node->key = key;
else
static avlnode_t *
avltree_dupe_node(const avltree_t *tree, const avlnode_t *node)
{
- avlnode_t *res = xcalloc(1, sizeof(*res));
+ avlnode_t *res = (avlnode_t*) xcalloc(1, sizeof(*res));
if (tree->options & AVLTREE_STATIC_KEYS)
res->key = node->key;
if (vec->ucs4_count == 0) return xstrdup(src); /* UTF-8 -> UTF-8 */
len = strlen(c);
- res = dest = xmalloc(len + 1); /* target will become smaller or equal length */
+ res = dest = (char *) xmalloc(len + 1); /* target will become smaller or equal length */
cend = c + len;
len += cet_ucs4_to_utf8(NULL, 6, value);
}
- result = cout = xmalloc(len + 1);
+ result = cout = (char *) xmalloc(len + 1);
cin = (char *)src;
while (*cin != '\0')
while (i-- > 0)
len += cet_ucs4_to_utf8(NULL, 6, le_read16(cin++));
- res = cout = xmalloc(len + 1);
+ res = cout = (char *) xmalloc(len + 1);
cin = (unsigned short *)src;
i = length;
else utf8 = cet_str_any_to_utf8(src, vec);
len = cet_utf8_strlen(utf8);
- res = sout = xcalloc(2, len + 1);
+ res = sout = (short int *) xcalloc(2, len + 1);
if (len) {
char *cin = utf8;
char *desc_geo;
char *desc;
- rec = xcalloc(sizeof(*rec)+18 + NOTESZ + DESCSZ,1);
+ rec = (struct cetus_wpt_s*) xcalloc(sizeof(*rec)+18 + NOTESZ + DESCSZ,1);
if (wpt->creation_time && (NULL != (tm = gmtime(&wpt->creation_time)))){
rec->min = tm->tm_min;
int
compare(const void *a, const void *b)
{
- const struct hdr *wa = a;
- const struct hdr *wb = b;
+ const struct hdr *wa = (const struct hdr*) a;
+ const struct hdr *wb = (const struct hdr*) b;
return strcmp(wa->wpt->shortname, wb->wpt->shortname);
}
}
/* allocate enough space for this data field */
- tmp = xcalloc((p - sp) + 1, sizeof(char));
+ tmp = (char *) xcalloc((p - sp) + 1, sizeof(char));
strncpy(tmp, sp, (p - sp));
tmp[p - sp] = '\0';
dblvals[2] = 60*(dblvals[1]-intvals[1]);
intvals[2] = (int)dblvals[2];
- subformat = xmalloc( strlen(format)+2);
+ subformat = (char*) xmalloc( strlen(format)+2);
formatptr = format;
buff[0] = '\0';
/* ofield is alloced to allow pointing back at ifields
* where applicable.
*/
- xcsv_file.ofield = xcalloc(sizeof(queue), 1);
+ xcsv_file.ofield = (queue*) xcalloc(sizeof(queue), 1);
QUEUE_INIT(xcsv_file.ofield);
/*
* Provide a sane default for CSV _files_.
*/
xcsv_file.type = ff_type_file;
- xcsv_file.mkshort_handle = mkshort_new_handle();
+ xcsv_file.mkshort_handle = (struct short_handle_*) mkshort_new_handle();
xcsv_file.gps_datum = GPS_DATUM_WGS84;
}
void
xcsv_ifield_add(char *key, char *val, char *pfc)
{
- field_map_t *fmp = xcalloc(sizeof(*fmp), 1);
+ field_map_t *fmp = (field_map_t *) xcalloc(sizeof(*fmp), 1);
struct xt_mapping *xm = in_word_set(key, strlen(key));
fmp->key = key;
void
xcsv_ofield_add(char *key, char *val, char *pfc, int options)
{
- field_map_t *fmp = xcalloc(sizeof(*fmp), 1);
+ field_map_t *fmp = (field_map_t *) xcalloc(sizeof(*fmp), 1);
struct xt_mapping *xm = in_word_set(key, strlen(key));
fmp->key = key;
void
xcsv_prologue_add(char *prologue)
{
- ogue_t* ogp = xcalloc(sizeof(*ogp), 1);
+ ogue_t* ogp = (ogue_t*) xcalloc(sizeof(*ogp), 1);
ogp->val = prologue;
ENQUEUE_TAIL(&xcsv_file.prologue, &ogp->Q);
void
xcsv_epilogue_add(char *epilogue)
{
- ogue_t * ogp = xcalloc(sizeof(*ogp), 1);
+ ogue_t * ogp = (ogue_t*) xcalloc(sizeof(*ogp), 1);
ogp->val = epilogue;
ENQUEUE_TAIL(&xcsv_file.epilogue, &ogp->Q);
char * ampm = NULL;
int ac;
- ampm = xmalloc( strlen(s) );
+ ampm = (char*) xmalloc( strlen(s) );
ac = sscanf(s, format, &hour, &min, &sec, &m);
/* If no time format in arg string, assume AM */
if (ac < 4) {
wpt->sat = atoi(s);
break;
case XT_GPS_FIX:
- wpt->fix = atoi(s)-1;
+ wpt->fix = (fix_type)(atoi(s)-(fix_type)1);
if ( wpt->fix < fix_2d) {
if (!case_ignore_strcmp(s, "none"))
wpt->fix = fix_none;
static signed int
alpha (const void *a, const void *b)
{
- const fl_vecs_t *const ap = a;
- const fl_vecs_t *const bp = b;
+ const fl_vecs_t *const ap = (const fl_vecs_t*) a;
+ const fl_vecs_t *const bp = (const fl_vecs_t*) b;
return case_ignore_strcmp(ap->desc , bp->desc);
}
void
garmin_fs_xml_fprint(gbfile *ofd, const waypoint *waypt)
{
- char *phone, *addr;
+ const char *phone, *addr;
garmin_fs_t *gmsd = GMSD_FIND(waypt);
if (gmsd == NULL) return;
GMSD_GETNSTR(cross_road, way->cross_road, sizeof(way->cross_road));
GMSD_GETNSTR(addr, way->addr, sizeof(way->addr));
}
-
gbser__db(4, "gbser_init(\"%s\")\n", port_name);
- h = xcalloc(sizeof *h, 1);
+ h = (gbser_handle*) xcalloc(sizeof *h, 1);
h->magic = MYMAGIC;
h->vmin = h->vtime = 0;
unsigned gbser__read_buffer(void *handle, void **buf, unsigned *len) {
gbser_handle *h = gbser__get_handle(handle);
unsigned count = *len;
- unsigned char *cp = *buf;
+ unsigned char *cp = (unsigned char *) *buf;
if (count > h->inbuf_used) {
count = h->inbuf_used;
}
*/
int gbser_write(void *handle, const void *buf, unsigned len) {
gbser_handle *h = gbser__get_handle(handle);
- const char *bp = buf;
+ const char *bp = (const char *) buf;
int rc;
while (len > 0) {
/*printf("write(%d, %p, %d)\n", h->fd, bp, len);*/
if ((*cin == '\0') || (cend == NULL))
fatal("%s: invalid section header '%s' in '%s'.\n", myname, cin, gbinipathname);
- sec = xcalloc(1, sizeof(*sec));
+ sec = (inifile_section_t *) xcalloc(1, sizeof(*sec));
sec->name = xstrdup(cin);
QUEUE_INIT(&sec->entries);
if (sec == NULL)
fatal("%s: missing section header in '%s'.\n", myname,gbinipathname);
- entry = xcalloc(1, sizeof(*entry));
+ entry = (inifile_entry_t *) xcalloc(1, sizeof(*entry));
ENQUEUE_TAIL(&sec->entries, &entry->Q);
sec->ientries++;
}
else fin = gbfopen(filename, "rb", myname);
- result = xcalloc(1, sizeof(*result));
+ result = (inifile_t *) xcalloc(1, sizeof(*result));
QUEUE_INIT(&result->secs);
inifile_load_file(fin, result, myname);
static arg_stack_t
*push_args(arg_stack_t *stack, const int argn, const int argc, char *argv[])
{
- arg_stack_t *res = xmalloc(sizeof(*res));
+ arg_stack_t *res = (arg_stack_t *) xmalloc(sizeof(*res));
res->prev = stack;
res->argn = argn;
}
gbfclose(fin);
- argv2 = xmalloc(2 * sizeof(*argv2));
+ argv2 = (char **) xmalloc(2 * sizeof(*argv2));
argv2[0] = xstrdup(*argv[0]);
argc2 = 1;
str = csv_lineparse(line, " ", "\"", 0);
while (str != NULL) {
- argv2 = xrealloc(argv2, (argc2 + 2) * sizeof(*argv2));
+ argv2 = (char **) xrealloc(argv2, (argc2 + 2) * sizeof(*argv2));
argv2[argc2] = xstrdup(str);
argc2++;
str = csv_lineparse(NULL, " ", "\"", 0);
#endif
{
int i;
- mkshort_handle *h = xxcalloc(sizeof *h, 1, file, line);
+ mkshort_handle *h = (mkshort_handle *) xxcalloc(sizeof *h, 1, file, line);
for (i = 0; i < PRIME; i++)
QUEUE_INIT(&h->namelist[i]);
add_to_hashlist(mkshort_handle *h, char *name)
{
int hash = hash_string(name);
- uniq_shortname *s = xcalloc(1, sizeof (uniq_shortname));
+ uniq_shortname *s = (uniq_shortname*) xcalloc(1, sizeof (uniq_shortname));
s->orig_shortname = xstrdup(name);
ENQUEUE_TAIL(&h->namelist[hash], &s->list);
dl = sprintf(tbuf, ".%d", s->conflictctr);
if (l + dl < h->target_len) {
- name = xrealloc(name, l + dl + 1);
+ name = (char *) xrealloc(name, l + dl + 1);
strcat(name, tbuf);
}
else {
}
}
- mkshort_handle = mkshort_new_handle();
+ mkshort_handle = (struct short_handle_*) mkshort_new_handle();
setshort_length(mkshort_handle, atoi(snlenopt));
if (opt_gisteq) {
ff_vecs_t nmea_vecs = {
ff_type_file,
- { ff_cap_read | ff_cap_write, ff_cap_read | ff_cap_write, ff_cap_none},
+ { (ff_cap)(ff_cap_read | ff_cap_write),
+ (ff_cap)(ff_cap_read | ff_cap_write),
+ ff_cap_none},
nmea_rd_init,
nmea_wr_init,
nmea_rd_deinit,
while ((count = gbfread(buff, 1, sizeof(buff), fin))) {
if (!res) {
- res = xmalloc(count);
+ res = (char *) xmalloc(count);
memcpy(res, buff, count);
}
else {
}
if ( !*dst ) {
- *dst = xcalloc( 1, sizeof( queue ));
+ *dst = (queue *)xcalloc( 1, sizeof( queue ));
QUEUE_INIT( *dst );
*dst_count = 0;
*dst_wpt_count = 0;
void track_recompute(const route_head *trk, computed_trkdata **trkdatap)
{
waypoint first;
- waypoint *this;
+ waypoint *thisw;
waypoint *prev = &first;
queue *elem, *tmp;
int tkpt = 0;
int pts_cad = 0;
double tot_cad = 0.0;
char tkptname[100];
- computed_trkdata *tdata = xcalloc(1, sizeof (computed_trkdata));
+ computed_trkdata *tdata = (computed_trkdata *)xcalloc(1, sizeof (computed_trkdata));
if (trkdatap) {
*trkdatap = tdata;
time_t timed;
double tlat, tlon, plat, plon, dist;
- this = (waypoint *)elem;
- timed = this->creation_time - prev->creation_time;
+ thisw = (waypoint *)elem;
+ timed = thisw->creation_time - prev->creation_time;
/*
* gcdist and heading want radians, not degrees.
*/
- tlat = RAD(this->latitude);
- tlon = RAD(this->longitude);
+ tlat = RAD(thisw->latitude);
+ tlon = RAD(thisw->longitude);
plat = RAD(prev->latitude);
plon = RAD(prev->longitude);
- WAYPT_SET(this, course, heading_true_degrees(plat, plon,
+ WAYPT_SET(thisw, course, heading_true_degrees(plat, plon,
tlat, tlon));
dist = radtometers(gcdist(plat, plon, tlat, tlon));
* conditionally recompute speeds.
*/
if (timed && (dist > 1)) {
- if(!WAYPT_HAS(this, speed)) {
+ if(!WAYPT_HAS(thisw, speed)) {
// Only recompute speed if the waypoint
// didn't already have a speed
- WAYPT_SET(this, speed, dist / labs(timed));
+ WAYPT_SET(thisw, speed, dist / labs(timed));
}
- if (this->speed > tdata->max_spd) {
- tdata->max_spd = this->speed;
+ if (thisw->speed > tdata->max_spd) {
+ tdata->max_spd = thisw->speed;
}
- if (this->speed < tdata->min_spd) {
- tdata->min_spd = this->speed;
+ if (thisw->speed < tdata->min_spd) {
+ tdata->min_spd = thisw->speed;
}
}
- if ((this->altitude > 0) && (this->altitude < tdata->min_alt)) {
- tdata->min_alt = this->altitude;
+ if ((thisw->altitude > 0) && (thisw->altitude < tdata->min_alt)) {
+ tdata->min_alt = thisw->altitude;
}
- if (this->altitude > tdata->max_alt) {
- tdata->max_alt = this->altitude;
+ if (thisw->altitude > tdata->max_alt) {
+ tdata->max_alt = thisw->altitude;
}
- if (this->heartrate > 0) {
+ if (thisw->heartrate > 0) {
pts_hrt++;
- tot_hrt += (float) this->heartrate;
+ tot_hrt += (float) thisw->heartrate;
}
- if ((this->heartrate > 0) && (this->heartrate < tdata->min_hrt)) {
- tdata->min_hrt = (int) this->heartrate;
+ if ((thisw->heartrate > 0) && (thisw->heartrate < tdata->min_hrt)) {
+ tdata->min_hrt = (int) thisw->heartrate;
}
- if ((this->heartrate > 0) && (this->heartrate > tdata->max_hrt)) {
- tdata->max_hrt = (int) this->heartrate;
+ if ((thisw->heartrate > 0) && (thisw->heartrate > tdata->max_hrt)) {
+ tdata->max_hrt = (int) thisw->heartrate;
}
- if (this->cadence > 0) {
+ if (thisw->cadence > 0) {
pts_cad++;
- tot_cad += (float) this->cadence;
+ tot_cad += (float) thisw->cadence;
}
- if ((this->cadence > 0) && (this->cadence > tdata->max_cad)) {
- tdata->max_cad = (int) this->cadence;
+ if ((thisw->cadence > 0) && (thisw->cadence > tdata->max_cad)) {
+ tdata->max_cad = (int) thisw->cadence;
}
- if (this->creation_time && (this->creation_time < tdata->start)) {
- tdata->start = this->creation_time;
+ if (thisw->creation_time && (thisw->creation_time < tdata->start)) {
+ tdata->start = thisw->creation_time;
}
- if (this->creation_time > tdata->end) {
- tdata->end = this->creation_time;
+ if (thisw->creation_time > tdata->end) {
+ tdata->end = thisw->creation_time;
if (tdata->start == 0) {
tdata->start = tdata->end;
}
}
- prev = this;
- if (!this->shortname || !this->shortname[0] ) {
+ prev = thisw;
+ if (!thisw->shortname || !thisw->shortname[0] ) {
snprintf(tkptname, sizeof(tkptname), "%s-%d",
trk->rte_name ? trk->rte_name : "" , tkpt);
- this->shortname = xstrdup(tkptname);
+ thisw->shortname = xstrdup(tkptname);
}
tkpt++;
}
if (session_ct == 0) QUEUE_INIT(&session_list);
session_ct++;
- s = xcalloc(1, sizeof(*s));
+ s = (session_t*) xcalloc(1, sizeof(*s));
ENQUEUE_TAIL(&session_list, &s->Q);
QUEUE_INIT(&s->category_list);
s->nr = session_ct;
xfree(s->filename);
xfree(s);
}
-
static int
trackfilter_init_qsort_cb(const void *a, const void *b)
{
- const trkflt_t *ra = a;
- const trkflt_t *rb = b;
+ const trkflt_t *ra = (const trkflt_t*) a;
+ const trkflt_t *rb = (const trkflt_t*) b;
return ra->first_time - rb->first_time;
}
if (track_pts < 1) return;
- buff = xcalloc(track_pts, sizeof(*buff));
+ buff = (waypoint **)xcalloc(track_pts, sizeof(*buff));
j = 0;
for (i = 0; i < track_ct; i++) /* put all points into temp buffer */
if (column % 4 == 0) {
int sz = (column + 4) * sizeof(*unicsv_fields_tab);
- if (column == 0) unicsv_fields_tab = xmalloc(sz);
- else unicsv_fields_tab = xrealloc(unicsv_fields_tab, sz);
+ if (column == 0) unicsv_fields_tab = (field_e*) xmalloc(sz);
+ else unicsv_fields_tab = (field_e*) xrealloc(unicsv_fields_tab, sz);
for (i = 0; i < 4; i++) unicsv_fields_tab[column + i] = fld_terminator;
}
static void
unicsv_waypt_enum_cb(const waypoint *wpt)
{
- char *shortname;
+ const char *shortname;
garmin_fs_t *gmsd;
shortname = (wpt->shortname) ? wpt->shortname : "";
{
double lat, lon, alt;
char *cout = NULL;
- char *shortname;
+ const char *shortname;
garmin_fs_t *gmsd;
#ifdef UNICSV_GC_READY
const geocache_data *gc_data = NULL;
}
newsz = strlen(src) + strlen(newd) + 1;
- src = xxrealloc(src, newsz, file, line);
+ src = (char *) xxrealloc(src, newsz, file, line);
strcat(src, newd);
return src;
bufsize = 0;
for (;;) {
if (bufsize == 0) {
- if ((buf = xmalloc(FIRSTSIZE)) == NULL) {
+ if ((buf = (char *) xmalloc(FIRSTSIZE)) == NULL) {
*strp = NULL;
return -1;
}
bufsize = FIRSTSIZE;
- } else if ((newbuf = xrealloc(buf, nextsize)) != NULL) {
+ } else if ((newbuf = (char *) xrealloc(buf, nextsize)) != NULL) {
buf = newbuf;
bufsize = nextsize;
} else {
if (bufsize > outsize + 1) {
const unsigned ptrsz = sizeof(buf);
if (((bufsize + ptrsz + 1) / ptrsz) > ((outsize + ptrsz + 1) / ptrsz))
- buf = xrealloc(buf, outsize + 1);
+ buf = (char *) xrealloc(buf, outsize + 1);
}
*strp = buf;
pstrdup(char *src)
{
int len = src[0];
- char *obuf = xmalloc(len + 1);
+ char *obuf = (char *) xmalloc(len + 1);
memcpy(obuf, src + 1, len);
obuf[len] = 0;
else cin = (char *)str;
len = strlen(cin);
- cout = tmp = xmalloc((len * 2) + 3);
+ cout = tmp = (char *) xmalloc((len * 2) + 3);
*cout++ = quot_char;
while (*cin) {
void
be_write16(void *addr, const unsigned value)
{
- unsigned char *p = addr;
+ unsigned char *p = (unsigned char *) addr;
p[0] = value >> 8;
p[1] = value;
signed int
le_read16(const void *addr)
{
- const unsigned char *p = addr;
+ const unsigned char *p = (const unsigned char *) addr;
return p[0] | (p[1] << 8);
}
unsigned int
le_readu16(const void *addr)
{
- const unsigned char *p = addr;
+ const unsigned char *p = (const unsigned char *) addr;
return p[0] | (p[1] << 8);
}
signed int
le_read32(const void *addr)
{
- const unsigned char *p = addr;
+ const unsigned char *p = (const unsigned char *) addr;
return p[0] | (p[1] << 8) | (p[2] << 16) | (p[3] << 24);
}
unsigned int
le_readu32(const void *addr)
{
- const unsigned char *p = addr;
+ const unsigned char *p = (const unsigned char *) addr;
return p[0] | (p[1] << 8) | (p[2] << 16) | (p[3] << 24);
}
void
le_read64(void *dest, const void *src)
{
- char *cdest = dest;
- const char *csrc = src;
+ char *cdest = (char *) dest;
+ const char *csrc = (const char *) src;
if (i_am_little_endian) {
memcpy(dest, src, 8);
void
le_write16(void *addr, const unsigned value)
{
- unsigned char *p = addr;
+ unsigned char *p = (unsigned char *) addr;
p[0] = value;
p[1] = value >> 8;
void
le_write32(void *addr, const unsigned value)
{
- unsigned char *p = addr;
+ unsigned char *p = (unsigned char *) addr;
p[0] = value;
p[1] = value >> 8;
p[2] = value >> 16;
endian_write_double(void* ptr, double d, int write_le)
{
int i;
- char *optr = ptr;
+ char *optr = (char *) ptr;
// Word order is different on arm, but not on arm-eabi.
#if defined(__arm__) && !defined(__ARM_EABI__)
char r[8];
{
char *r = (char *)(void *)&f;
int i;
- char *optr = ptr;
+ char *optr = (char *) ptr;
if ( i_am_little_endian == write_le ) {
memcpy( ptr, &f, 4);
return NULL;
}
- d = xmalloc(len + rlen);
+ d = (char *) xmalloc(len + rlen);
/* Copy first part */
len = p - s;
int slen = strlen(search);
int rlen = strlen(replace);
- o = xmalloc(olen + 1);
+ o = (char *) xmalloc(olen + 1);
while ((c = strstr(src, search))) {
olen += (rlen - slen);
- o = xrealloc(o, olen + 1);
+ o = (char *) xrealloc(o, olen + 1);
memcpy(o + ooffs, src, c - src);
ooffs += (c - src);
src = c + slen;
char prev;
int ylen;
- result = xcalloc((2*strlen(human_datef)) + 1, 1);
+ result = (char *) xcalloc((2*strlen(human_datef)) + 1, 1);
cout = result;
prev = '\0';
ylen = 0;
char *result, *cin, *cout;
char prev;
- result = xcalloc((2*strlen(human_timef)) + 1, 1);
+ result = (char *) xcalloc((2*strlen(human_timef)) + 1, 1);
cout = result;
prev = '\0';
#endif
/* enough space for the whole string plus entity replacements, if any */
- tmp = xcalloc((strlen(str) + elen + 1), 1);
+ tmp = (char *) xcalloc((strlen(str) + elen + 1), 1);
strcpy(tmp, str);
/* no entity replacements */
*/
void gb_setbit(void *buf, const gbuint32 nr)
{
- unsigned char *bytes = buf;
+ unsigned char *bytes = (unsigned char *) buf;
bytes[nr / 8] |= (1 << (nr % 8));
}
*/
char gb_getbit(const void *buf, const gbuint32 nr)
{
- const unsigned char *bytes = buf;
+ const unsigned char *bytes = (const unsigned char *) buf;
return (bytes[nr / 8] & (1 << (nr % 8)));
}
alpha (const void *a, const void *b)
{
- const vecs_t *const *ap = a;
- const vecs_t *const *bp = b;
+ const vecs_t *const *ap = (const vecs_t *const*) a;
+ const vecs_t *const *bp = (const vecs_t *const*) b;
return case_ignore_strcmp((*ap)->desc , (*bp)->desc);
}
#endif // CSVFMTS_ENABLED
- svp = xcalloc(vc, sizeof(style_vecs_t *));
+ svp = (vecs_t **)xcalloc(vc, sizeof(style_vecs_t *));
/* Normal vecs are easy; populate the first part of the array. */
for (vec = vec_list; vec->vec; vec++, i++) {
svp[i] = vec;
/* Walk the style list, parse the entries, dummy up a "normal" vec */
for (svec = style_list; svec->name; svec++, i++) {
xcsv_read_internal_style(svec->style_buf);
- svp[i] = xcalloc(1, sizeof **svp);
+ svp[i] = (vecs_t*) xcalloc(1, sizeof **svp);
svp[i]->name = svec->name;
- svp[i]->vec = xmalloc(sizeof(*svp[i]->vec));
+ svp[i]->vec = (ff_vecs_t*) xmalloc(sizeof(*svp[i]->vec));
svp[i]->extension = xcsv_file.extension;
*svp[i]->vec = *vec_list[0].vec; /* Interits xcsv opts */
/* Reset file type to inherit ff_type from xcsv for everything
switch(xcsv_file.datatype) {
case 0:
case wptdata:
- svp[i]->vec->cap[ff_cap_rw_wpt] = ff_cap_read | ff_cap_write; break;
+ svp[i]->vec->cap[ff_cap_rw_wpt] = (ff_cap) (ff_cap_read | ff_cap_write); break;
case trkdata:
- svp[i]->vec->cap[ff_cap_rw_trk] = ff_cap_read | ff_cap_write; break;
+ svp[i]->vec->cap[ff_cap_rw_trk] = (ff_cap) (ff_cap_read | ff_cap_write); break;
case rtedata:
- svp[i]->vec->cap[ff_cap_rw_rte] = ff_cap_read | ff_cap_write; break;
+ svp[i]->vec->cap[ff_cap_rw_rte] = (ff_cap)(ff_cap_read | ff_cap_write); break;
default: ;
}
svp[i]->desc = xcsv_file.description;
if (flags & VMFL_NOZERO)
vm.mem = xmalloc(size);
else
- vm.mem = xcalloc(size, 1);
+ vm.mem = (char *) xcalloc(size, 1);
vm.size = size;
return vm;
}
}
return;
}
-
-
return;
}
- res = xcalloc( 1, sizeof(xml_tag));
+ res = (xml_tag*) xcalloc( 1, sizeof(xml_tag));
*copy = res;
memcpy( res, src, sizeof(xml_tag));
result->fs.convert = fs_xml_convert;
return result;
}
-